home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.10 / demo / sparx.i / .spark03.i < prev    next >
Text File  |  1995-04-19  |  956b  |  58 lines

  1.  
  2. Procedure Spark03;
  3. Const
  4.     max3lines = 64;
  5. Type
  6.     Sp1lines    = Array[1..max3lines] of line;
  7.     Sp1LinesPtr = ^Sp1Lines;
  8.  
  9. Var
  10.     arr    : Sp1LinesPtr;
  11.     cnt1    : Short;
  12.     cnt2    : Short;
  13.     CCNT    : Short;
  14.     add1    : Short;
  15.     add2    : Short;
  16.     actualline : Short;
  17. Begin
  18.     New(arr);
  19.     ActualLine := 1;
  20.  
  21.  
  22.     cnt1 := 1;
  23.     cnt2 := 3;
  24.     CCNT := 2;
  25.     add1 := 7;
  26.     add2 := 3;
  27.  
  28.     Repeat
  29.       EraseLine( Adr(arr^[actualline]) );
  30.       With arr^[actualline] do begin
  31.         x1 := 160;
  32.         y1 := 120;
  33.         x2 := 160 + XSin^[cnt2] * 8 DIV 5;    { +- max.160 }
  34.         y2 := 120 + Xcos^[cnt2] * 6 DIV 5;    { +- max.120 }
  35.       end;
  36.  
  37.       cnt1 := cnt1 + add1;
  38.       if cnt1>627 then cnt1:= cnt1-628;
  39.  
  40.       cnt2 := cnt2 + add2;
  41.       if cnt2>627 then cnt2:= cnt2-628;
  42.  
  43.       DrawLine( Adr(arr^[actualline]), cnt2 );
  44.  
  45.       inc( CCNT );
  46.       If CCNT > maxColors then CCNT := 2;
  47.  
  48.       inc( actualline );
  49.       If actualline > max3lines then actualline := 1;
  50.  
  51.     Until LeftMouseButton;
  52.  
  53.     Ciao;
  54.     Dispose(arr);
  55.     SetSColors( Adr(Def_Colors) );
  56. End;
  57.  
  58.